// import { toAbsURL } from '@/utils/index.js'
const state = {
    WebOfficeInfo: {
        title: 'WebOffice控件安装说明',
        descItems: [
            '1、下载控件：http://topsmart.xyz:1315/group1/M00/08/71/wKgBtF7NOriANCaLAAADEK5Bw0M762.bat',
            '2、双击[WebOffice_Setup.bat]会自动完成控件的全部安装。',
            '3、如果安装过程提示“是”与“否”，请选择“是”,如果安装过程提示是否“Next”，请选择“Next”即可。',
            '3、如果安装过程提示“是”与“否”，请选择“是”,如果安装过程提示是否“Next”，请选择“Next”即可。',
            '注意：安装前请先不要在浏览器打开试用版WebOffice控件,建议安装前重启下计算机。'
        ],
        download: 'http://192.168.200.105:1315/group1/M00/08/71/wKgBtF7NOriANCaLAAADEK5Bw0M762.bat'
    },
    WebOfficeBool: true,
    // WebOfficeFile: toAbsURL('/static/a.ppt'),
    WebOfficeFile: 'http://192.168.200.105:1315/group1/M00/00/D8/wKgAnV4GOdyAFD59AOPAAAEDHxk183.ppt'

}

const mutations = {
    SET_BOOL: (state, bool) => {
        state.WebOfficeBool = bool
    },
    SET_FILE: (state, path) => {
        state.WebOfficeFile = path
    }
}

const actions = {
    setBool({
        commit
    }, bool) {
        commit('SET_BOOL', bool)
    },
    setFile({
        commit
    }, file) {
        commit('SET_FILE', file)
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}